<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>新闻添加页</title>
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/index.css">
</head>
<body>
	<!-- 导航开始 -->
	<nav class="navbar">
		<div class="container navbar-content">
			<a href="01-新闻列表页.html">首页</a>
			<a href="03-新闻添加页.html">添加新闻</a>
		</div>
	</nav>
	<!-- 导航结束 -->
	
	<!-- 图片 -->
	<img src="images/bg.jpg" class="index-bg">

	<div class="container">
	    <div class="add-news col-md-8 col-md-offset-2">
			<h1>添加新闻</h1>
			
			<form action="insert.php" method="post">
				<div class="form-group">
	                <label for="news_title">新闻标题</label>
	                <input type="text" name="title"class="form-control" id='news_title'>
	            </div>
				<!-- 新闻作者 -->
	             <div class="form-group">

				    <label for="news_author">作者</label>
				  
				    <select name="author" >
				     <?php foreach($authors as $author):?>
				    	<option value="<?php echo $author['id'];?>"><?php echo $author['name'];?></option>
				    	 <?php endforeach;?>
				    </select>
				 
				</div>
					
	            <div class="form-group">
	                <label for="news_content">新闻内容</label>
	                <textarea class="form-control" name="content"rows="12"></textarea>
	            </div>

	            <button class="btn btn-primary btn-block">添加</button>
			</form>
	    </div>
	  
			
		<!-- 底部开始 -->
	    <footer class="copyright" style='border-top: none;'>Copyright 2019 Mr.Xu All rights reserved.</footer>
		<!-- 底部结束 -->
	</div>
</body>
</html>